home *** CD-ROM | disk | FTP | other *** search
- //
- // The Fusion Library Interface for DOS
- // Version 1.06c
- // Copyright (C) 1990, 1991, 1992
- // Software Dimensions
- //
- // FusionWindow
- //
-
- #include "fliwin.h"
-
- #ifdef __BCPLUSPLUS__
- #pragma hdrstop
- #endif
-
- //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- //
- // WaterFallWindows()
- //
- // Waterfalls the windows
- //
- //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-
- void FusionWindow::WaterFallWindows()
- {
- if (NumberOfWindows<2)
- return;
-
- int CurrentY=1;
- int CurrentHeight=BlazeClass::WhatHeight()-2;
-
- for (int i=NumberOfWindows-1;i>=0;i--)
- {
- Windows[i]->X=0;
- Windows[i]->Y=CurrentY;
- Windows[i]->Width=BlazeClass::WhatWidth();
- Windows[i]->Height=CurrentHeight;
-
- CurrentY++;
- CurrentHeight--;
-
- if (CurrentHeight<5)
- {
- CurrentY=1;
- CurrentHeight=BlazeClass::WhatHeight()-2;
- }
- }
-
- RemoveAllMenus();
- RefreshWindows();
- }
-
-